from appium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from base.base import Base
class Shousuopage(Base):
    guanzhu = (By.ID,'com.kongfz.app:id/lav_2')
    shousuokuang = (By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout/android.widget.FrameLayout[2]/android.view.ViewGroup/android.view.ViewGroup/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout')
    dianjisousuo=(By.XPATH,'//android.widget.EditText[@text="动态 书友 话题"]')
    shousuoanniu = 'new UiSelector().text("搜索")'
    dy = (By.ID,'com.kongfz.app:id/tv_nickname')
    dy2 = (By.ID, 'com.kongfz.app:id/tv_empty_info')
    dy3 = (By.ID, 'com.kongfz.app:id/et_search')
    def sousuoyuwu(self,flie):
        self.loc_ele(self.guanzhu).click()
        sleep(2)
        self.loc_ele(self.shousuokuang).click()
        sleep(2)
        self.loc_wait_ele(self.dianjisousuo).send_keys(flie)
        sleep(2)
        self.loc_ui_ele(self.shousuoanniu).click()
        sleep(2)